package com.thrd.taiexhibition.presener;

import com.thrd.taiexhibition.bean.BeanThemeIndustry;
import com.thrd.taiexhibition.callback.MvpCallback;
import com.thrd.taiexhibition.model.ThemeIndustryHomeModel;
import com.thrd.taiexhibition.view.ThemeIndustryHomeView;

/**
 * @author: ${唐杰}
 * @date: 2021/3/30
 */
public class ThemeIndustryHomePresener {
    private ThemeIndustryHomeModel mThemeIndustryHomeModel;
    private ThemeIndustryHomeView mThemeIndustryHomeView;

    public ThemeIndustryHomePresener(ThemeIndustryHomeView mThemeIndustryHomeView){
        this.mThemeIndustryHomeView=mThemeIndustryHomeView;
        this.mThemeIndustryHomeModel=new ThemeIndustryHomeModel();
    }

    public void getCityFocusData(long cityId){
        mThemeIndustryHomeModel.getThemeIndustryHomeData(cityId, new MvpCallback<BeanThemeIndustry>() {
            @Override
            public void onSuccess(BeanThemeIndustry beanHotActivityList) {
                mThemeIndustryHomeView.onSuccess(beanHotActivityList);
            }

            @Override
            public void onFailed(String e, int code) {
                mThemeIndustryHomeView.onError(e,code);
            }
        });
    }

}
